<template>
    <div>孙子组件<button @click="handleParent">孙子组件btn</button></div>
</template>

<script>
import bus from '@/utils/eventBus';

export default {
    components: {},
    props: {},
    data() {
        return {};
    },
    inject: ['parentThis'],
    computed: {},
    methods: {
        handleParent() {
            this.parentThis.showInput();
        }
    },
    created() {
        console.log('我是孙子组件接收的值', this.msg);
        bus.$on('fromParent', (res) => {
            console.log(res, '我是接收值的');
        });
    },
    mounted() {}
};
</script>
<style scoped></style>
